<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$appConfigs.title}</title>

    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/{$page_theme | default: 'default'}/easyui.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/style/my.css">
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/javascript/my.js"></script>
    
</head> 
<body onpageshow="resetPagination('dg')">
    {datagrid id="dg" datasource="/invest/AccountService/findAll.do" view="i_account"}
    {form id="dlg" view="i_account" }
    {form id="dlg2" view="i_account_flow" }
    
    <script>
    var user_id = '{$principal.id}';
    field_formatters.account_type=function (value, row, index){
		if(value == 1)
			return '现金账户';
		else
			return '投资账户';
    }
    function showAccountFlow() {
	    var row = getDatagrid('dg').datagrid('getSelected');
	    if(row) {
	    	window.parent.openTab(row.name + '的流水','/invest/account/account_flow.shtml?account_id='+row.account_id);
	    } else {
			alert('没有选择投资计划！');
	    }
    }
    </script>
</body>
</html>